package com.cd.learn.cdlearn.pattern.flyweight;

/**
 * @ClassName Client
 * @Description TODO
 * @Author seven
 * @Date 2021/7/423:00
 * @Version 1.0
 **/
public class Client {

    public static void main(String[] args) {
        AbstractBox i = BoxFactory.getInstince()
                .get("I");
        i.display("red");
        AbstractBox l = BoxFactory.getInstince()
                .get("L");
        AbstractBox i1 = BoxFactory.getInstince()
                .get("I");
        i1.display("green");
        System.out.println(i==i1);
    }
}
